package com.example.template.service.impl;

import com.example.template.bean.User;
import com.example.template.dao.UserDao;
import com.example.template.service.UserService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 *
 * @author admin
 * @date 2018/4/11
 */
@Service
public class UserServiceImpl implements UserService {

    private  static final Logger logger= LoggerFactory.getLogger(UserServiceImpl.class);

    @Autowired
    private UserDao userDao;



    @Override
    public void create(String name, Integer age) {
        userDao.create(name,age);
    }

    @Override
    public List<User> selectAllUsers() {
        return userDao.selectAllUsers();
    }

    @Override
    public User selectUserById(int id) {
        return userDao.selectUserById(id);
    }


}
